package com.ydj.reggie.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ydj.reggie.common.R;
import com.ydj.reggie.entity.Employee;


import javax.servlet.http.HttpServletRequest;

/**
 * @author ydj
 * @version 1.0
 */
public interface EmployeeService extends IService<Employee> {

    /**
     * 登陆
     *
     * @param request
     * @param employee
     * @return
     */
    R<Employee> login(HttpServletRequest request, Employee employee);

    /**
     * 退出
     *
     * @param request
     * @return
     */
    R<String> logout(HttpServletRequest request, String msg);

    /**
     * 添加员工
     *
     * @param employee
     * @return
     */
    R<String> addEmployee(HttpServletRequest request, Employee employee);

    /**
     * 员工信息分页查询
     * @param page
     * @param pageSize
     * @param name
     * @return
     */
    R<Page> getEmployeeByPage(int page, int pageSize, String name);
}
